﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HeresyManager.Traits
{
    [Serializable]
    public class CavesOfSteel : Trait
    {
        public override string Name
        {
            get { return "Caves Of Steel"; }
        }

        Skill skill;

        public override IEnumerator<Comunication.Comunicator> Accire(Character c)
        {
            skill = new Skills.TechUse(Skill.SkillLevel.Basic);
            var e = base.Accire(c);
            while (e.MoveNext())
                yield return e.Current;
            e = c.AddSkill(skill, this);
            while (e.MoveNext())
                yield return e.Current;
        }

        public override void DeAccire(Character c)
        {
            base.DeAccire(c);
            c.RemoveSkill(skill, this);
        }
    }
}
